package com.zhz.leetcode.set;

/**
 * 自建的HashSet
 */
public class MyHashSet {

    boolean[] arr;

    public MyHashSet() {
        int length = (int) Math.pow(10, 6);
        arr = new boolean[length+1];
    }

    public void add(int key) {
        arr[key] = true;
    }

    public void remove(int key) {
        arr[key] = false;
    }

    public boolean contains(int key) {
        return arr[key];
    }

}
